<template>
  <div class="dialog-wrapper">
    <div class="dialog-mask"></div>
    <div class="dialog-tip">
      <span @click="sureClick">确定</span>
      <span @click="closeClick">取消</span>
    </div>
  </div>
</template>

<script>
import { mapActions } from "vuex";
export default {
  //
  props: {},
  methods: {
    // updateDialog
    ...mapActions("cart", ["updateDialog"]),
    sureClick() {
      this.updateDialog({ typeBtn: "sure" });
    },
    closeClick() {
      this.updateDialog({ typeBtn: "close" });
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/assets/_common.scss";
.dialog-wrapper {
  @include wh(100vw, 100vh);
  @include flex_center;
  position: fixed;
  left: 0;
  top: 0;
  .dialog-mask {
    @include wh(100%, 100%);
    background: black;
    opacity: 0.6;
    position: absolute;
    left: 0;
    top: 0;
  }
  .dialog-tip {
    @include wh(60%, 40%);
    background: blanchedalmond;
    z-index: 5;
  }
}
</style>